import request from '@/utils/request'

// 查询机房列表
export function listRoom(query) {
  return request({
    url: '/business/room/list',
    method: 'get',
    params: query
  })
}

// 查询机房详细
export function getRoom(machineRoomId) {
  return request({
    url: '/business/room/' + machineRoomId,
    method: 'get'
  })
}

// 新增机房
export function addRoom(data) {
  return request({
    url: '/business/room',
    method: 'post',
    data: data
  })
}

// 修改机房
export function updateRoom(data) {
  return request({
    url: '/business/room',
    method: 'put',
    data: data
  })
}

// 删除机房
export function delRoom(machineRoomId) {
  return request({
    url: '/business/room/' + machineRoomId,
    method: 'delete'
  })
}


// 获取机房集合
export function getRoomListAll(query) {
  return request({
    url: '/business/room/listAll',
    method: 'get',
    params:query
  })
}